﻿using System;
using System.Reflection;
using Fabrication.ValueProviders;

namespace Fabrication.Tests.Mocks
{
    public class MockValueProvider : IValueProvider
    {
        private readonly Func<object, int, string> modifier;
        private int count;

        public MockValueProvider(Func<object, int, string> modifier)
        {
            this.modifier = modifier;
        }

        public object GetValue(object item)
        {
            count++;
            return modifier(item, count);
        }

        public void Initialize(PropertyInfo property)
        {
        }
    }
}